package com.example.administrator.yiroote.dialog;

import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.support.v7.app.AlertDialog;

import com.example.administrator.yiroote.activity.HomeActivity;
import com.example.administrator.yiroote.activity.LoginActivity;

/**
 * Created by Administrator on 2017/7/3.
 */

public class AlterDielog {
    public  void testDialog(final Context context){
        AlertDialog.Builder normaldialog =new AlertDialog.Builder(context);
        //设置内容
        normaldialog.setTitle("1234567");
        normaldialog.setIcon(android.support.v7.appcompat.R.drawable.abc_ic_star_black_36dp)
                .setMessage("zhesgqiweiqjdasmdlasldnaklsdkka")
        .setPositiveButton("queren", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {

            }
        })
       .setNeutralButton("qwe", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                Intent intent=new Intent(context,HomeActivity.class);
                context.startActivity(intent);

            }
        }).
        setNegativeButton("quxiao", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {

            }
        });
   normaldialog.show();
    }
}
